﻿using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;

namespace Benlai.Mongo
{
    /// <summary>
    /// MongoDB实体类的基类
    /// </summary>
    public class MongoModel
    {
        /// <summary>
        /// 基类对象的ID，MongoDB要求每个实体类必须有的主键
        /// </summary>
        [BsonRepresentation(BsonType.ObjectId)]
        public string Id { get; set; }
    }
    

}